import Vue from "vue"
import forwardDialog from "@/components/common/forwardDialog.vue"
import store from "@/store"
const ForwardDialogConstructor = Vue.extend(forwardDialog)
const ForwardDialog = {
  open(content) {
    const instance = new ForwardDialogConstructor({ store })
    instance.$mount()
    document.body.appendChild(instance.$el)
    return instance.open(content)
  }
}

export default {
  install(Vue) {
    Vue.prototype.$forwardDialog = ForwardDialog
  }
}
